/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package business.services;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;
import model.Milestone;
import model.Project;

/**
 *
 * @author jmoura
 */
public class ComparatorFactory implements Serializable {

    /**
     * Sort projects
     */
    public static void getComparatorProjectSorterByName(List<Project> list) {
        Collections.sort(list, new ComparatorProjectSorter(0));
    }

    public static void getComparatorProjectSorterByTotalCost(List<Project> list) {
        Collections.sort(list, new ComparatorProjectSorter(1));
    }

    public static void getComparatorProjectSorterByStartDate(List<Project> list) {
        Collections.sort(list, new ComparatorProjectSorter(2));
    }

    public static void getComparatorMilestoneSorterByName(List<Milestone> list) {
        Collections.sort(list, new ComparatorMilestoneSorter(0));
    }
}
